@var _width=220;
@if(isEmpty(width)){
@   width=_width;
@}
@var _panelWidth=280;
@if(isEmpty(panelWidth)){
@   panelWidth=_panelWidth;
@}
@var selectHandler="+function(){}";
@if(isNotEmpty(onSelect)){
@   selectHandler=onSelect;
@}
<div class="form-group has-feedback">
    @if(!isEmpty(name)){    
        <label class="lab">${name!}</label>
    @}
    <#Hidden id="${id}" name="${id}" value="" />
    <input class="textbox" id="lookup_${id}" name="lookup_${id}">
</div>
<script>
$(function(){
	$("#lookup_${id}").lookup({
		// disabled:true,
		// readOnly:true,
		// hasDownArrow:false,
		width:${width},
        panelWidth:${panelWidth},
		url:'/user/query/',
		mode:'remote',
		idField:'id',
		textField:'name',
		columns:[[
			{field:'name',title:'姓名',width:250}
		]],
		pagination:true,
		onSelect:function(index,rowData){
            $("#${id}").val(rowData.id);
            ${selectHandler}(index,rowData);
		},
        onBeforeShowPanel:function(){
			$("#lookup_${id}").lookup("options").url='/user/query/'+LookUpSysOrgID;
		},
		isCombo:true,
		enableNumberEvent:true,
		minQueryLen:3
	});
})
@if(isNotEmpty(desc)){
    $("#lookup_${id}").val("${desc}");
@}
@if(isNotEmpty(value)){
    $("#${id}").val("${value}");
@}
</script>